'use strict'

const { Controller } = require('ee-core')
const Log = require('ee-core/log')
const Services = require('ee-core/services')

/**
 * example
 * @class
 */
class ExampleController extends Controller {

    constructor(ctx) {
        super(ctx)
    }


    /**
     * 所有方法接收两个参数
     * @param args 前端传的参数
     * @param event - ipc通信时才有值。详情见：控制器文档
     */

    /**
     * fsSearch
     */
    async fsSearch (args) {
        const result = await Services.get('fs').fsSearch(args)
        return result
    }
    async fsReplace (args) {
        const result = await Services.get('fs').fsReplace(args)
        return result
    }
}

ExampleController.toString = () => '[class ExampleController]'
module.exports = ExampleController  